package com.lantosec.hmrp.modules.morality.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.morality.vo.MoralityPlanVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评方案 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MoralityPlan extends BaseEntity<MoralityPlanVO> {

    private static final long serialVersionUID = 1L;
    public MoralityPlan(MoralityPlanVO vo){
        this.moralityPlanId = vo.getMoralityPlanId();
        this.moralityPlanName = vo.getMoralityPlanName();
        this.moralityCycleId = vo.getMoralityCycleId();
        this.branchStep = vo.getBranchStep();
        this.state = vo.getState();
        this.createUserId = vo.getCreateUserId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.editorUserId = vo.getEditorUserId();
        this.editorUser = vo.getEditorUser();
        this.editorTime = vo.getEditorTime();
    }

    @Override
    public MoralityPlanVO convertToVO(){
        return new MoralityPlanVO(this);
    }


    /**
     * 考评方案ID
     */
    @TableId(value = "morality_plan_id", type = IdType.AUTO)
    private Integer moralityPlanId;

    /**
     * 考评方案名称
     */
    private String moralityPlanName;

    /**
     * 方案周期ID
     */
    private Integer moralityCycleId;

    /**
     * 考评流程是否有党支部环节(0否 1是)
     */
    private Integer branchStep;

    /**
     * 方案状态(1暂停 2启用 3到期 4作废)
     */
    private Integer state;

    /**
     * 创建人ID
     */
    private String createUserId;

    /**
     * 创建人
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 最后编辑人ID
     */
    private String editorUserId;

    /**
     * 最后编辑人
     */
    private String editorUser;

    /**
     * 最后编辑时间
     */
    private Date editorTime;


    public enum ColName {
        morality_plan_id, morality_plan_name, morality_cycle_id, branch_step, state, create_user_id, create_user, create_time, editor_user_id, editor_user, editor_time, 
    }
}
